package com.miluGame.util;

import java.io.Serializable;

//工具类分页
public class Page implements Serializable {
	
	private int pageNum = 15;
	
	private int pageStart =1;
	
	private int totalCount;			//总条数
	
	private int pageTotalCount;		//总页数

	
	
	
	public Page(int totalCount, int pageTotalCount) {
		super();
		this.totalCount = totalCount;
		this.pageTotalCount = pageTotalCount;
	}

	
	/**
	 * @return the pageNum
	 */
	public int getPageNum() {
		return pageNum;
	}

	/**
	 * @param pageNum the pageNum to set
	 */
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}

	/**
	 * @return the pageStart
	 */
	public int getPageStart() {
		return pageStart;
	}

	/**
	 * @param pageStart the pageStart to set
	 */
	public void setPageStart(int pageStart) {
		this.pageStart = pageStart;
	}

	/**
	 * @return the totalCount
	 */
	public int getTotalCount() {
		return totalCount;
	}

	/**
	 * @param totalCount the totalCount to set
	 */
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	/**
	 * @return the pageTotalCount
	 */
	public int getPageTotalCount() {
		pageTotalCount = getTotalCount() / getPageNum();
		return (totalCount % getPageNum() == 0) ? pageTotalCount
		: pageTotalCount + 1;
	}

	/**
	 * @param pageTotalCount the pageTotalCount to set
	 */
	public void setPageTotalCount(int pageTotalCount) {
		this.pageTotalCount = pageTotalCount;
	}
	
}
